#include "taskthread.h"

taskThread::taskThread() {}

void taskThread::run()
{
    if(m_deal)
    {
        m_taskwindow->updateTasks(m_Num);
        qDebug() << m_Num << "线程run()执行完毕，退出...";
        return;
    }

    while(m_flag)
    {
        m_index = (m_index+1)%m_Imgs.size();
        updateScene(m_Num);
        QThread::usleep(1000);
        m_taskwindow->updateTasks(m_Num);
        QThread::sleep(1);
    }
}

void taskThread::dealTask()
{
    m_deal = true;
    start();
}
